package com.xyf.sys.enums;

/**
 * @Author R-H
 * @Date 2024/4/201955
 * @Description
 */
public enum LogisticsEventEnum {

    UNKNOW(0, "未知"),
    PICKUP(1, "已收件"),
//    TRANSIT(2, "已揽运"),
    FACTORY_PICKUP(2, "已揽收"),
    FACTORY_COMPLETE(3, "已完成"),
//    DELIVERY(5, "正在揽送"),
    STATION(4, "已到店");

    private Integer type;

    private String name;

    LogisticsEventEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public static String getName(Integer type) {
        for (LogisticsEventEnum eventEnum : LogisticsEventEnum.values()) {
            if (eventEnum.type.equals(type)) {
                return eventEnum.name;
            }
        }
        return "未知";
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name == null ? null : name.trim();
    }
}
